package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.BeanSystemInfo;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.MainModel;
import com.thrd.taiexhibition.view.MainView;

/**
 * @author: ${唐杰}
 * @date: 2021/4/25
 */
public class MainPresener {

    private  MainModel mMainMidel;

    private MainView mMainView;

    public MainPresener(MainView mMainView){
        mMainMidel = new MainModel();
        this.mMainView=mMainView;
    }

    public void getSystemInfo(){
        mMainMidel.getSystemInfo(new MvpCallback<BeanSystemInfo>() {
            @Override
            public void onSuccess(BeanSystemInfo beanSystemInfo) {
                mMainView.onSuccess(beanSystemInfo);
            }

            @Override
            public void onFailed(String e, int code) {
                mMainView.onError(e,code);
            }
        });
    }
}
